<?php
/**
 * 轻云网络验证系统
 * =======================================================
 * 版权所有(C) 2019-2039 daenx.cn，并保留所有权利。
 * 作者：Daen大恩
 * 作者QQ: 1330166565
 * 开发群：661059773
 * =======================================================
 */


//判断是否已安装
if(!is_file("./install/lock") && is_file("./install/index.php")){
	@header("location:install/index.php");
}
include 'data/weby.php';
?>
<?php
include 'head.php';
?>
<title>代理查询 - <?php echo $title;?></title>
 <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="static/css/music.css" rel="stylesheet">
<link href="static/css/bootstrap.min.css" rel="stylesheet">
<link href="static/css/animate.min.css" rel="stylesheet">
<link href="static/css/font-awesome.min.css" rel="stylesheet">
<link href="static/css/form.css" rel="stylesheet">
<link href="static/css/calendar.css" rel="stylesheet">
<link href="static/css/file-manager.css" rel="stylesheet">
<link href="static/css/style.css" rel="stylesheet">
<link href="static/css/icons.css" rel="stylesheet">
<link href="static/css/generics.css" rel="stylesheet">
<link rel="shortcut icon" href="<?php echo $route?>img/LightCloud.png" type="image/x-icon" />
<STYLE>.loginscreen.middle-box{width:300px;}.middle-box{max-width:400px;z-index:100;margin:0 auto;padding-top:100px;}</STYLE>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?0de8a795db3f2bcc6c9c374ab7468d22";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body id="skin-blur-violate">
<section class="middle-box " align="center">
<div class="tile p-15">
<div class="container">
<img id="btnAudio" class="profile-pic animated" src="http://q.qlogo.cn/headimg_dl?bs=qq&dst_uin=<?php echo $kfqq; ?>&fid=blog&spec=100" alt="">
<form action="?" method="get">
<input type="hidden" name="do" value="do">
<div class="form-group">
<section id="main">
<label for="exampleInputEmail1">请选择后产品，然后输入代理QQ点击查询</label>
<br>
<select name="ycp" class="form-control" >
								<option value=''>请选择要查询的产品 </option>
 									<?php 
										$sql="select * from products ORDER BY `id` DESC";
										$result=mysqli_query($con,$sql);
										if($result&&mysqli_num_rows($result)){
											while ($row=mysqli_fetch_assoc($result)) {
												if($row['qt']==1){
												echo "<option value='".$row['cp']."'>".$row['cp']."</option>";	}										
											}
										}
									?>   
</select>
<br>
<input type="text" class="form-control input-sm" name="search" placeholder='请输入需要查询的代理QQ' required>
</div>
<div class="form-group">

<label for="exampleInputPassword1">
</label>
</div>

<div class="fileupload fileupload-new" data-provides="fileupload">
<button type="Submit" href="#" class="btn btn-block btn-alt">查询</button>

<?php
include 'data/config.php';

$get = $_GET[search];
$ycp = $_GET[ycp];

if($get){
	if($ycp==null){echo("<script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/js/jquery.min.js\"></script><script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/layer/layer.js\"></script><script>layer.open({  type: 1  ,title: false   ,closeBtn: false  ,area: '200px;'  ,shade: 0.8  ,id: 'LAY_layuipro'   ,resize: false  ,btn: ['确定']  ,moveType: 1   ,content: '<div style=\"padding: 30px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;\"><p style=\"text-align:left;\"><label>请选择要查询的产品</label><br /></p></div>'  ,success: function(layero){ var btn = layero.find('.layui-layer-btn');  btn.find('.layui-layer-btn0').attr({ href: 'dlqq.php' });  }});</script>");die();}
	
	$SQL = "SELECT * FROM `daili` WHERE `domain`='$get' and `ycp`='$ycp'";
	$query=mysqli_query($con,$SQL);
	while($row =mysqli_fetch_array($query)){
		$domain = $row[domain];
		$name = $row[username];
		$zt = $row[yumi];
		$bz = $row[bz];
		$dl = $row['dl'];
		if($zt=="1")
		{$zt = "禁用中";}
		else
		{$zt = "正常";}
										
	}
	
	if($get != $domain){
	echo("<script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/js/jquery.min.js\"></script><script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/layer/layer.js\"></script><script>layer.open({  type: 1  ,title: false   ,closeBtn: false  ,area: '200px;'  ,shade: 0.8  ,id: 'LAY_layuipro'   ,resize: false  ,btn: ['确定']  ,moveType: 1   ,content: '<div style=\"padding: 30px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;\"><p style=\"text-align:left;\"><label>查询账号：</label>".$get."<br /><label>查询产品：</label>".$ycp." &nbsp;&nbsp;<br /><label>查询结果：</label><font style=\"color:#EE4000;\">不是本站代理，请谨慎交易！</font></p></div>'  ,success: function(layero){ var btn = layero.find('.layui-layer-btn');  btn.find('.layui-layer-btn0').attr({ href: 'dlqq.php' });  }});</script>");
	}
	else{

	echo("<script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/js/jquery.min.js\"></script><script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/layer/layer.js\"></script><script>layer.open({  type: 1  ,title: false   ,closeBtn: false  ,area: '200px;'  ,shade: 0.8  ,id: 'LAY_layuipro'   ,resize: false  ,btn: ['确定']  ,moveType: 1   ,content: '<div style=\"padding: 30px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;\"><p style=\"text-align:left;\"><label>查询账号：</label>".$domain."<br /><label>级别：</label>".$dl."<br /><label>状态：</label>".$zt."<br /><label>备注：</label>".$bz."<br /><label>产品：</label>".$ycp." &nbsp;&nbsp;<font style=\"color:#FFC125;\"><label>查询结果：</label><font style=\"color:#ADFF2F;\">官方授权代理</font> &nbsp;&nbsp;<font style=\"color:#FFC125;\"><label>可放心交易</label></font></p></div>'  ,success: function(layero){ var btn = layero.find('.layui-layer-btn');  btn.find('.layui-layer-btn0').attr({ href: 'dlqq.php' });  }});</script>");
	}
}
?>	

</div>
<a data-toggle="modal" href="javascript:history.back(-1)" class="btn btn-sm m-t-10">返回上一页</a>
<a data-toggle="modal" href="/get" class="btn btn-sm m-t-10">更换授权</a>
<a href="http://wpa.qq.com/msgrd?v=3&amp;uin=<?php echo $kfqq; ?>&amp;site=qq&amp;menu=yes" target="_blank" class="btn btn-sm m-t-10">联系客服</a>
<a href="/daili.php" target="_blank" class="btn btn-sm m-t-10">购买授权</a>
</form>
</div>

<!--<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=335 height=210 src="//music.163.com/outchain/player?type=0&id=982689732&auto=0&height=430"></iframe>--> 

<script src="get/qrlogin.js"></script>
<script src="static/js/jquery.min.js"></script>  
<script src="static/js/jquery-ui.min.js"></script>  
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/scroll.min.js"></script>  
<script src="static/js/calendar.min.js"></script>  
<script src="static/js/feeds.min.js"></script>  
<script src="static/js/elfinder.min.js"></script>  
<script src="static/js/music.js"></script>
<script type="text/javascript">
            $(document).ready(function() {
                 $('#fileManager').elfinder({
                      resizable: false,
                      url : 'php/connector.minimal.php',  // connector URL (REQUIRED)
                      uiOptions : {
                      toolbar : [
                              ['back', 'forward', 'home', 'reload'],
                              ['mkdir', 'mkfile', 'upload'],
                              ['view', 'sort'],
                              ['search']
                      ]},
                      height: 500
                 });
                 
                 $('.elfinder-cwd-wrapper, .elfinder-navbar').niceScroll();
            });
</script>
</body>
</html>